"""
@name : 选择结构
@author : wenyao
@projectname: xsfh
"""

# import math
#
# a = int(input("请输入边长a："))
# b = int(input("请输入边长b："))
# c = int(input("请输入边长c："))
#
# if a>0 and b>0 and c>0 and  a+b>c and c+b>a and c+a>b:
#     p = (a + b + c)/2
#     s = math.sqrt(p*(p-a)*(p-b)*(p-c))
#     print(f"面积:{s}")
# else:
#     print("输入不合法")
#
# if a>0 and b>0 and c>0 :
#     if a+b>c and c+b>a and c+a>b:
#         p = (a + b + c)/2
#         s = math.sqrt(p*(p-a)*(p-b)*(p-c))
#         print(f"面积:{s}")
#     else:
#         print("两边之和小于等于第三边")
# else:
#     print("输入不合法")

#####if....elif....else...
# if exp1:
#     语句一
# elif exp2：
#     语句二
#elif  exp3:
#      语句三
# else：
#     语句四

#########三元运算
a = 10
b = 20
#第一种方法
# c = a >=b  and a or b
# print(c)
#第二种方法
# if a>=b:
#     c = a
# else:
#     c = b
#第三种方法：
# c = a if a>=b else b
a = "hello world xixi haha"
#str1  如果a里面有y字符的话 str1 = “yy”
#      如果a里面有x字符的话 str1 = “xx”
#      否则  str1 = “zz”
str1 = "yy"  if "y" in a else "xx"  if "x" in a else "zz"
print(str1)